package org.wiztools.te.plugin;
import java.util.Calendar;

import org.wiztools.te.TEMod;
import org.wiztools.te.TEProcess;

public class Dt implements TEProcess{
	private TEMod tem;
	private String[] month;
	
	public void setTEMod(TEMod tem){
		this.tem = tem;
	}
	
	public void init(){
		String[] month = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
		this.month = month;
	}
	
	public void action(){
		Calendar c = Calendar.getInstance();
		tem.insert(month[c.get(Calendar.MONTH)]+" "+c.get(Calendar.DATE)+", "+c.get(Calendar.YEAR));
	}
	
	public void destroy(){
		// do nothing!
	}
}
